package com.xxpt.common.enums;

/**
 * 常量
 * @Author masl - 2018/11/1 10:42
 */
public class SysConstant {
    public static int SUPER_ADMIN = 1;         //超级管理员
    public static final String NULL_KEY_NAME = "--";
    public static String CURR_PROFILE = "";//当前运行环境

    //public static String IS_SYN_SYS_PARAM = "IS_SYN_SYS_PARAM"; // 是否需要同步系统参数

    //短信===============
    public static final String SMS_SIGN = "信息平台";//短信签名
    public static final String SMS_MOTIOR_TEMPLETE_CODE = "SMS_151992180";//监控短信模板编号

    public static String SMS_ACCESS_KEY = "LTAIwyZRlavSyxXK";
    public static String SMS_ACCESS_SECRET = "G6aTwQQr2wASheLGwC2oioHtl9iiVS";
    public static String SNED_EMAIL_HOST = "mail.bjsxtx.com";
    public static String SNED_EMAIL_USER = "mashanlin@bjsxtx.com";
    public static String SNED_EMAIL_PWD = "a12345678";

    //=================================== 系统参数 end ==========================================

    public static int PAGE_SIZE = 20;//默认分页大小
    public static String SUPER_ACCOUNT = "admin"; // 超级管理员帐号
    public static int ARTICLE_SUMMARY_LEN = 80; // 文章 summary 最长长度

    //public static boolean LIST_BULID_SMALL_IMG = true; //列表页自动生成缩略图 -- 缩略图不存储数据库中
    public static String SMALL_IMG_EXT = "_small";//缩略图后缀串

    public static String DEF_SHOW_IMG = "/static/img/default.jpg";//默认显示图片 -- 后台

    public static String DEF_LINK_SHOW_IMG = "/linkImg/default.jpg";//h5 -- 默认链接显示图片
    public static String DEF_ARTICLE_SHOW_IMG = "/articleImg/default.jpg";//h5 -- 默认文章显示图片
    public static Integer EDITOR_IMG_MAX_WIDTH = 600; //富文本编辑器图片最大宽度

    //查找图片 src
    public static final String IMG_SRC_REGEX = "<img(.*?)src=['\"]?(?<src>.*?)['\"]";

    //---------------------

    public static final String MENU_SHIRO_PERMS = "sys:menu:view"; // 菜单权限标识
    public static final String ROLE_SHIRO_PERMS = "sys:role:view"; // 角色权限标识
    public static final String REGISTER_SHIRO_PERMS = "sys:regist:view"; // 注册管理权限标识
    public static final String ARTICLE_SHIRO_PERMS = "article"; // 文章权限标识
    public static final String CATEGORY_SHIRO_PERMS = "sys:category:view"; // 类目权限标识
    public static final String MSG_SHIRO_PERMS = "sys:msg:view"; // 消息管理
    public static final String SYS_USER_SHIRO_PERMS = "sys:user:view"; // 系统用户权限标识
    public static final String BIZ_ACTIVITY_SHIRO_PERMS = "biz:activity:index"; // 系统用户权限标识
    public static final String BIZ_TRAIN_RECORD_PERMS = "train-record:list"; // 系统用户权限标识
    public static final String BIZ_TRAIN_HOUR = "biz:train:hour"; //申请培训学时权限标识
    public static final String MSG_TEMPLATE_PERMS = "sys:msgtemplate:view"; // 流程消息模板管理
    public static final String FLOW_AREA_PERMS = "flow:area:view"; // 流程管理
    public static final String FLOW_AREA_PROCE_PERMS = "flow:area:biz"; // 流程管理

    public static final String ROLE_ALLMENULIST = "_ROLE_ALLMENULIST"; // 角色全部菜单
    public static final String ROLE_ALL_PERMS = "_ROLE_ALL_PERMS"; // 角色全部权限标识

    public static final String DEF_USER_LOGIN_PWD = "123456";//系统默认登录密码

    public static final String KAPTCHA_SESSION_KEY = "sessionSecCode";
    public static final String SESSION_USER = "sessionUser";
    // 缓存键
    public static final String DATA_PRIVILEGE = "_DATA_PRIVILEGE"; // 数据权限
    public static final String PRIVILEGE_AREA_PREFIX = "PRIVILEGE_AREA_"; // 地区数据权限-缓存key前缀
    //cookie 保存帐号键
    public static String COOKIE_ACCOUNT_KEY = "information-account";
    public static String COOKIE_PWS_KEY = "information-password";

    //字典项code
    public static String ACTIVITY_TYPE_CODE = "activity_type";
    public static String TRAIN_TYPE_CODE = "train_type";
    public static String PROPERTY_CODE = "property";

    // excel最大导出行数
    public static Integer EXCEL_EXPORT_MAX_NUMBER = 500000;

    /**
     * 菜单类型
     */
    public enum MenuType {
        /**
         * 目录
         */
        CATALOG(0),
        /**
         * 菜单
         */
        MENU(1),
        /**
         * 按钮
         */
        BUTTON(2);

        private int value;

        MenuType(int value) {
            this.value = value;
        }

        public int getValue() {
            return value;
        }
    }

    /**
     * 定时任务状态
     */
    public enum ScheduleStatus {
        /**
         * 正常
         */
        NORMAL(0),
        /**
         * 暂停
         */
        PAUSE(1);

        private int value;

        ScheduleStatus(int value) {
            this.value = value;
        }

        public int getValue() {
            return value;
        }
    }

    /**
     * 地区级别
     */
    public enum AreaLevel{
        /**
         * 国家级
         */
        COUNTRY(0),
        /**
         * 省级
         */
        PROVINCE(1),
        /**
         * 市级
         */
        CITY(2),
        /**
         * 区/县级
         */
        COUNTY(3);

        private int value;

        AreaLevel(int value) {
            this.value = value;
        }

        public int getValue() {
            return value;
        }
    }
}
